html,
body,
#app {
  width: 100%;
  height: 100%;
}
* {
  outline: none;
  box-sizing: border-box;
}
/* 解决 h1 标签在 webkit 内核浏览器中文字大小失效问题 */
:-webkit-any(article, aside, nav, section) h1 {
  font-size: 2em;
}
/* 滚动条 */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-thumb {
  border-radius: 20px;
}
/* clearfix */
.clearfix::after {
  display: block;
  height: 0;
  overflow: hidden;
  clear: both;
  content: '';
}

/* 文字多了自动換行 */
.break-word {
  word-break: break-all;
  word-wrap: break-word;
}
/* nprogress */
#nprogress .bar {
  background: var(--el-color-primary) !important;
}
#nprogress {
  .spinner {
    top: 13px;
    right: 16px;
  }
  .spinner-icon {
    border-top-color: var(--el-color-primary) !important;
    border-left-color: var(--el-color-primary) !important;
  }
}
#nprogress .peg {
  box-shadow:
    0 0 10px var(--el-color-primary),
    0 0 5px var(--el-color-primary) !important;
}
/* 迷雾遮罩 */
.fog-mask {
  padding-right: 10px;
  mask-image: linear-gradient(
    90deg,
    #000000 0%,
    #000000 calc(100% - 50px),
    transparent
  );
}
/* custom card */
.card {
  padding: 20px;
  overflow-x: hidden;
  background-color: var(--el-bg-color);
  border-radius: 6px;
  box-shadow: 0 0 12px rgb(0 0 0 / 5%);
}

//图片加载指令样式
.img-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
}
/* 暗黑模式切换动画 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root),
.dark::view-transition-new(root) {
  z-index: 1;
}
::view-transition-new(root),
.dark::view-transition-old(root) {
  z-index: 9999;
}

/* 波纹指令 */
.waves-ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.15);
  pointer-events: none;
  user-select: none;
  transform: scale(0);
  opacity: 1;
  &.z-active {
    opacity: 0;
    transform: scale(2);
    transition:
      opacity 1s ease-out,
      transform 0.3s cubic-bezier(0.68, 0.01, 0.62, 0.6);
  }
}
